<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class PmsWebservice implements ShouldQueue{

    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    private $_flag;
    private $_params;
    private $response;
    public function __construct($flag, $params = [])
    {

        $this->_flag =$flag;
        $this->_params = $params;
    }


    public function handle()
    {
        $func = '_' . $this->_flag;
        return $this->$func();

    }

    private function _receivePGInfoService(){
        $res[] = ['title' => '待发放', 'flag' => 'released'];
        return $res;
    }

}
